﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace _8Group.MES.Model.DV设备管理
{
    /// <summary>
    /// 设备开停机记录表模型类
    /// </summary>
    public class DV_Dss_Record : Entity<int>
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public int MachineryId { get; set; }

        /// <summary>
        /// 设备编码
        /// </summary>
        public string MachineryCode { get; set; } = string.Empty;

        /// <summary>
        /// 设备名称
        /// </summary>
        public string? MachineryName { get; set; } = string.Empty;

        /// <summary>
        /// 品牌
        /// </summary>
        public string? MachineryBrand { get; set; } = string.Empty;

        /// <summary>
        /// 规格型号
        /// </summary>
        public string? MachinerySpec { get; set; } = string.Empty;

        /// <summary>
        /// 记录类型（START：开机；STOP：停机）
        /// </summary>
        public string RecordType { get; set; } = "STOP";

        /// <summary>
        /// 记录时间
        /// </summary>
        public DateTime RecordTime { get; set; }

        /// <summary>
        /// 停机类型（INPLAN：计划中停机；MALFUNCTION：异常停机）
        /// </summary>
        public string ShutdownType { get; set; } = string.Empty;

        /// <summary>
        /// 停机原因
        /// </summary>
        public string? ShutdownReason { get; set; } = string.Empty;

        /// <summary>
        /// 停机时长
        /// </summary>
        public decimal? ShutdownDuration { get; set; }

        /// <summary>
        /// 时长单位（MINUTES：分钟；HOURS：小时；DAYS：天）
        /// </summary>
        public string? DurationUnit { get; set; } = string.Empty;

        /// <summary>
        /// 状态
        /// </summary>
        public string? Status { get; set; } = string.Empty;

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateBy { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string? UpdateBy { get; set; } = string.Empty;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }
}
